/*
 * Copyright (C) 2017 Pingan, Inc. All Rights Reserved.
 */

package com.pingan.haofang.searchcloud.es.api;

import com.pingan.haofang.searchcloud.api.query.parser.element.SelectStatement;

/**
 * elasticsearch查询接口
 *
 * @author zhangbi617
 * @date 2017-07-31
 */
public interface ElasticSearchSearchService {

    /**
     * 数据查询
     *
     * @param host
     * @param sql
     * @return
     */
    SearchResultDTO query(String host, String sql, SelectStatement statement) throws Exception;

    /**
     * 解释
     *
     * @param host
     * @param sql
     * @return
     */
    String explain(String host, String sql, SelectStatement statement);


    SearchResultDTO query(String collection, String params, String host) throws Exception;
}
